﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;

namespace YiSha.Entity.QixingManage
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2023-12-16 21:38
    /// 描 述：权益表实体类
    /// </summary>
    [Table("Privilege")]
    public class PrivilegeEntity : BaseEntity
    {
        /// <summary>
        /// 配置名称
        /// </summary>
        /// <returns></returns>
        public string name { get; set; }
        /// <summary>
        /// 规则描述
        /// </summary>
        /// <returns></returns>
        public string description { get; set; }
        /// <summary>
        /// 会员等级
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? level_id { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? start_time { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? end_time { get; set; }
        /// <summary>
        /// 是否启动
        /// </summary>
        /// <returns></returns>
        public int? IsEnable { get; set; }
        /// <summary>
        /// 周范围
        /// </summary>
        /// <returns></returns>
        public string dayOfWeek { get; set; }
        /// <summary>
        /// 时段规则
        /// </summary>
        /// <returns></returns>
        public string timePeriodRules { get; set; }
        /// <summary>
        /// 配置值
        /// </summary>
        /// <returns></returns>
        public string value { get; set; }
        /// <summary>
        /// 配置key
        /// </summary>
        /// <returns></returns>
        public string key { get; set; }
        /// <summary>
        /// 归类
        /// </summary>
        /// <returns></returns>
        public string classify { get; set; }

        /// <summary>
        /// 图片路径
        /// </summary>
        public string iocn { get; set; }

        /// <summary>
        /// 权重
        /// </summary>
        public int? weight { get; set; }
    }
}
